Information about the ASP upload/insert functions for htmlArea 2.03
***********************************************************************************
htmlArea License (based on BSD license)
Copyright (c) 2002, interactivetools.com, inc.
All rights reserved.
***********************************************************************************
Insert/upload functions are rewritten by Eivind Savio
http://www.savio.no
Only function's rewritten/made by Eivind Savio are described in this text.

THERE ARE NO WARRANTIES OR SUPPORT FOR THESE FILES

If you wan't to redistribute these functions,- go ahead.
***********************************************************************************

UPLOAD FILES:
***********************************************************************************
All upload files are found in the popups folder.

upload.asp is the main file. This file have no function except include the functions inside this file with the use of iframe.
--------------------------------------------------------------------------------------------------
upload_include.asp is the file where you browse for files and inserts information about the file you are going to upload.
..................................................................................................
Title of the file must be written, if not you will get into trouble when you are using the insert image function. The Title will also be used as the Alternate value.
..................................................................................................
Description is a description of the file.
..................................................................................................
Filetype is a easy function to store images and documents into different folder. The value 1 = images and the value 2 = documents.
It isn't included a function to attach documents so you can remove this function if you wan't to. You also have to rewrite the upload_insert.asp file if you do so.
--------------------------------------------------------------------------------------------------
loader.asp does is the file that does the upload work. It's pure ASP so you don't need any components installed. It shouldn't be necessary to rewrite anything in this file.
--------------------------------------------------------------------------------------------------
upload_insert.asp have the loader.asp file included, and does the rest of the "job." This file insert also the information into the Database.
If you wan't to change the folders where the files are going to be uploaded you do it in this file. It's plenty of comment's so it shouldn't be that hard.
Improvement's that can be done is to make error handling in this file. You will be able to upload a file even if the information isn't stored in the database.

Images are stored into folder /files/images/
Documents are stored into folder /files/documents/

In the editor.js file look for the value 'upload' if you wan't to change something about this function in this file.
***********************************************************************************

INSERT FILES:
***********************************************************************************
Get's the values from the database. All files are found in the popups folder.
insert_image.asp is the main file. This file is based on a version of browse image found at interactivetools.com's forum.
Changes in this file by Eivind Savio is commented out and start's with EiSa. 
--------------------------------------------------------------------------------------------------
imagelist.asp is made with the use of Dreamweaver MX so the ASP-code in this file is messy. 
Values that are important in cooperation with the insert_image.asp file are found around line 460.
imagelist.asp is included in the insert_image.asp with the use of iframe.

DATABASE:
***********************************************************************************
The database are found inside the folder /htmlarea/Database/
The name is ImgDatabase.mdb. The different fields in the database are explained in the database.
NB! FileID nr. 1 must not be deleted. If you delete this ID the upload function will not work because the filename are changed and uses the FileID value as
a part of the new name.

If problems with the database you can create your own. 
Name of database: ImgDatabase.mdb
Name of table: Files

FIELDS:
FileID -> Autonumber. Primary Key
FileHeading -> Text. 
FileText -> Text
FileURL -> Text
FileKeyWords -> Text
FileType -> Number
FileDate -> Date/Time
--------------------------------------------------------------------------------------------------
ImgDatabase.asp is the file that take care of the connection string to the Database.
This file must be stored in the folder
/Connections/
***********************************************************************************

POSSIBLE PROBLEM AREAS:
***********************************************************************************
insert_image.asp if the Title-field is empty.

Don't know, maybe the recordsets because it's written by MX and uses the connection-string as a included file.

HAPPY PROGRAMMING!